<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var arr = [3, 1, 3, 2];
    let arr1 = arr.join()

    console.log(arr1.split(','))


  </script>
</body>

</html>